package bma.common.netty.webserver.common;

import java.util.concurrent.locks.ReentrantLock;

import bma.common.netty.webserver.Session;

public class SessionManagerCommon extends SessionManagerAbstract {

	final org.slf4j.Logger log = org.slf4j.LoggerFactory
			.getLogger(SessionManagerCommon.class);

	protected SessionCache data;

	public void init() {
		data = new SessionCache(this.sessionDataSize, new ReentrantLock());
	}

	public void close() {
		if (data != null) {
			data.clear();
		}
	}

	@Override
	public Session getSession(String sid, boolean created) {
		return super.getSession(this.data, sid, created);
	}

}
